package qmm.util;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

	

	public class jdbcutil {
		public static int update(String sql){
			int n = 0;
			try {
				Class.forName("com.mysql.jdbc.Driver");
				Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/qmm?characterEncoding=utf8","root","admin");
				Statement st = conn.createStatement();
				n = st.executeUpdate(sql);			
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
			} catch (SQLException e) {
				e.printStackTrace();
			}
			return n;
		}

		public static Connection getConnection() {
			// TODO Auto-generated method stub
			return null;
		}

		public static Connection getConnection1() {
			// TODO Auto-generated method stub
			return null;
		}

		public static Connection Connection1() {
			// TODO Auto-generated method stub
			return null;
		}

		public static Connection Connection() {
			// TODO Auto-generated method stub
			return null;
		}
	}

